/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package iv1201.view;

import java.util.Date;

/**
 *
 * @author anorber
 */
public class DateField 
{

    private final Date dateFieldFrom;
    private final Date dateFieldTo;

    /*
     * Method for setting 
     */    
    DateField(Date dateFieldFrom, Date dateFieldTo) 
    {
        this.dateFieldFrom = dateFieldFrom;
        this.dateFieldTo = dateFieldTo;
    }

    public Date getDateFieldFrom() 
    {
        return dateFieldFrom;
    }

    public Date getDateFieldTo() 
    {
        return dateFieldTo;
    }
    
    @Override
    public boolean equals(Object other) 
    {
        if (other instanceof DateField)
            return false;
        return ((DateField)other).dateFieldFrom.equals(this.dateFieldFrom);
    }

    @Override
    public int hashCode() 
    {
        return (this.dateFieldFrom != null ? this.dateFieldFrom.hashCode() : 0);
    }    
}
